<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <title>类型</title>
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <link rel="stylesheet" href="../../../../component/elementUI/index.css" />
    <link rel="stylesheet" href="../../../../style/index.css" />
    <style>
        .upload_file.none .el-upload {
            display: none;
        }
    </style>
</head>

<body>
    <div id="app" class="minWidth">
        <el-tabs type="border-card" v-model="activeName" @tab-click="onSerach">
            <el-tab-pane :label="item.label" :name="item.value" v-for="(item,index) in tabs" :key="index">
                <el-table :data="tableData" v-if="'first' == activeName" height="calc(100vh - 240px)" stripe
                    style="width: 100%">
                    <el-table-column prop="ContractID" width="150" align="center" label="合同编号">
                    </el-table-column>
                    <el-table-column align="center" label="商品图片" width="100">
                        <template v-slot="{ row }">
                            <el-image class="rounded-lg shadow"
                                style="width: 100rpx; height: 100rpx;object-fit: contain;"
                                :src="'https://www.kdddy.cn/Image/' + row.Show_image" mode="scaleToFill">
                            </el-image>
                        </template>
                    </el-table-column>
                    <el-table-column width="200" align="center" prop="Enterprise_Name" label="甲方"></el-table-column>
                    <el-table-column align="center" prop="PartyB_Enterprise_Name" label="乙方"
                        width="250"></el-table-column>
                    <el-table-column align="center" label="商品信息" min-width="180">
                        <template v-slot="{row}">
                            {{row.VarietyName?row.VarietyName:row.Article_Name?row.Article_Name:''}}
                        </template>
                    </el-table-column>
                    <el-table-column align="center" prop="SupplyQuantity" label="交易数量" min-width="180">
                        <template v-slot="{row}">
                            {{(row.SupplyQuantity?row.SupplyQuantity:row.RequestQuantity) + row.Unit}}
                        </template>
                    </el-table-column>
                    <el-table-column align="center" prop="DeliveryLocation" label="交货地"></el-table-column>
                    <el-table-column prop="PayableReceivable" align="center" label="交易金额"></el-table-column>
                </el-table>
                <el-table v-else :data="tableData" style="width: 100%" height="calc(100vh - 240px)" stripe
                    style="width: 100%">
                    <el-table-column align="center" prop="ContractID" label="合同编号" width="180"></el-table-column>
                    <el-table-column align="center" label="商品图片" width="100">
                        <template v-slot="{ row }">
                            <el-image class="rounded-lg shadow"
                                style="width: 100rpx; height: 100rpx;object-fit: contain;"
                                :src="'https://www.kdddy.cn/Image/' + row.Show_image" mode="scaleToFill">
                            </el-image>
                        </template>
                    </el-table-column>
                    <el-table-column align="center" prop="Enterprise_Name" label="甲方" width="180"></el-table-column>
                    <el-table-column align="center" prop="PartyB_Enterprise_Name" label="乙方"
                        width="180"></el-table-column>
                    <el-table-column align="center" prop="VarietyName" label="品种"></el-table-column>
                    <el-table-column align="center" prop="SupplyQuantity" label="交易数量" min-width="180">
                        <template v-slot="{row}">
                            {{(row.SupplyQuantity?row.SupplyQuantity:row.RequestQuantity) + row.Unit}}
                        </template>
                    </el-table-column>
                    <el-table-column align="center" prop="DeliveryLocation" label="交货地"></el-table-column>
                    <el-table-column prop="PayableReceivable" align="center" label="交易单价">
                        <template v-slot = "{row}">
                            {{row.UnitPrice}}
                        </template>
                    </el-table-column>
                </el-table>
                <el-pagination style="margin-top: 5px" background @size-change="handleSizeChange"
                    @current-change="handleCurrentChange" :current-page="form.pageNumber" :page-sizes="[10, 20, 30, 50]"
                    :page-size="form.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total">
                </el-pagination>
            </el-tab-pane>
        </el-tabs>
        <el-form>
            <el-form-item class="form-operation">
                <el-button @click="window.history.back()">返回</el-button>
            </el-form-item>
        </el-form>
    </div>
    <script type="text/javascript" src="../../../../config/config.js"></script>

    <script type="text/javascript" src="../../../../utils/jquery-3.6.0.min.js"></script>
    <script type="text/javascript" src="../../../../utils/jquery.cookie.js"></script>
    <script type="text/javascript" src="../../../../utils/vue.min.js"></script>
    <script type="text/javascript" src="../../../../component/component.js"></script>
    <script type="text/javascript" src="../../../../component/elementUI/index.js"></script>
    <script type="text/javascript" src="../../../../utils/compressor.js"></script>
    <script type="text/javascript" src="../../../../utils/utils.js"></script>
    <script type="text/javascript" src="../../../../utils/ID_Validity.js"></script>
    <script type="text/javascript" src="../js/show.js"></script>
</body>

</html>